package cn.hxth.cloud.api.mapper;


import cn.hxth.cloud.api.domain.Product;
import cn.hxth.cloud.api.tk.mapper.MyMapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper extends MyMapper<Product> {
    @Results(
            value =
            {
                    @Result(column="id" ,property="id",id = true),
                    @Result(column="height" ,property="height" ),
                    @Result(column="height_hot" ,property="heightHot"),
                    @Result(column="height_uot" ,property="heightUot"),
                    @Result(column="thickness" ,property="thickness"),
                    @Result(column="thickness_hot" ,property="thicknessHot"),
                    @Result(column="diameter" ,property="diameter"),
                    @Result(column="diameter_hot" ,property="diameterHot"),
                    @Result(column="diameter_uot",property="diameterUot" ),
                    @Result(column="inradium" ,property="inradium"),
                    @Result(column="inradium_hot" ,property="inradiumHot"),
                    @Result(column="inradium_uot" ,property="inradiumUot"),
                    @Result(column="sale_inventory" ,property="saleInventory"),
                    @Result(column="locked_inventory" ,property="lockedInventory"),
                    @Result(column = "sid",property = "sid")
            }
    )
    @Select("SELECT * FROM product")
    public List<Product> list() ;
}